package com.bluefish.bltuan.module.user;

import javax.persistence.Column;
import javax.persistence.Entity;

import com.bluefish.bltuan.tools.user.UserRight;

@Entity
public class Manager extends AbstractUser {

	private static final long serialVersionUID = -7947191079718553960L;
	
	
	private String realname;
	
	@Column(nullable=true)
	private boolean activated = false;

	public String getRealname() {
		return realname;
	}

	public void setRealname(String realname) {
		this.realname = realname;
	}

	public boolean isActivated() {
		return activated;
	}

	public void setActivated(boolean activated) {
		this.activated = activated;
	}
	
	public void activate(){
		setActivated(true);
	}

	public void freeze(){
		setActivated(false);
	}
	
	public void setRight(){
		setUserRight(UserRight.ADMIN);
	}
}
